<template>
  <div>
    <table>
      <tr v-for="(g,index) in goods" v-bind:key="index">
        <td>{{g.id}}</td>
        <td>{{g.name}}</td>
      </tr>
    </table>
  </div>
</template>
<script>
export default{
  data(){
    return{
      goods:[]
    }
  },
  created(){
    //发请求获取数据
    this.axios.get(this.baseUrl+"goods/all")
      .then(res =>{
        //res.data   ResponseResult
        console.log(res.data.data);
        //
        this.goods = res.data.data;
      });
  }
}
</script>
<style scoped>

</style>